
package results;
import objects.Station;

/**
 * Indicates the number of interferences with its neigbours
 * 
 * @author Guillaume
 * @created June 8, 2004
 */

public class ProbeComNbInterferences extends ProbeCom {

	/** Property name monitored by the probe */
	private static final String PROPERTY_NAME = "ProbeComNbInterferences";

	/** Probe description */
	private static final String PROBE_DESCRIPTION = "";
       

	/**
	 * @param t
	 * @param probeName probe name
	 */
	public ProbeComNbInterferences(Station t, String probeName) {
		super(COM_LOOP,t,probeName);
	}

	/** 
	 * Nb of stations interferencing with the monitored station
	 * @return nb of stations (Integer)
	 * @see Results.Probe#getValue()
	 */
	protected Object getValue() {
		return new Integer(((Station) _linkedStation).getInterferenced().size());
	}

	/**
	 * Get the property Name
	 * @return property name
	 * @see Results.Probe#getPropertyName()
	 */
	public String getPropertyName() {
		return PROPERTY_NAME;
	}

	/**
	 * Get the descitption of the probe
	 * @return probe description
	 * @see Results.Probe#getProbeDescription()
	 */
	public String getProbeDescription() {
		return PROBE_DESCRIPTION;
	}
	
	public static void main(String[] args) {
	}
}
